<?php
defined('BY_JYA') or exit('error');
global $_RQ,$_AR;
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();
if($_RQ['op']=='get'){
	$return['item']=$this->plugin_setting('setting');
	$return['item']['func1']="model('jy_baidu/set_data')->upnews($title,$content,$abstract,$save,$article_tag),$title 文章标题,$content 文章内容,$abstract 文章摘要,$save 0存草稿，1发布,$article_tag 文章分类名";
	$return['item']['func2']="cfc('jy_baidu')->video()";
	$return['htmls']=array (
		  'type' => 'edit',
		  'post' => 'post',
		  'edit_tab' => '参数设置',
		  'edits' => 
		  array (
		    0 => 
		    array (
		      'title' => '参数设置',
		      'list' => 
		      array (
				array ('name' => 'app_id','type' => 'string','title' => '作者账号ID','help'=>'https://baijiahao.baidu.com申请获取'),
				array ('name' => 'app_token','type' => 'string','title' => '授权密钥','help'=>'https://baijiahao.baidu.com申请获取'),
				array ('name' => 'func1','type' => 'string','title' => '图文发文方法为','read'=>true,'help'=>'更多使用方法请参考官方文档：https://baijiahao.baidu.com/builder/rc/develop'),
		      ),
		    ),
		  ),
		);
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();	
	$item=$this->plugin_setting('setting',$postdata);
	exi('设置成功！');
}
?>